package com.ruoyi.sl.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.sl.mapper.SlOfcLeaveMapper;
import com.ruoyi.sl.domain.SlOfcLeave;
import com.ruoyi.sl.service.ISlOfcLeaveService;

/**
 * 请假信息Service业务层处理
 * 
 * @author admin
 * @date 2024-06-14
 */
@Service
public class SlOfcLeaveServiceImpl implements ISlOfcLeaveService 
{
    @Autowired
    private SlOfcLeaveMapper slOfcLeaveMapper;

    /**
     * 查询请假信息
     * 
     * @param leaveMpayId 请假信息主键
     * @return 请假信息
     */
    @Override
    public SlOfcLeave selectSlOfcLeaveByLeaveMpayId(Long leaveMpayId)
    {
        return slOfcLeaveMapper.selectSlOfcLeaveByLeaveMpayId(leaveMpayId);
    }

    /**
     * 查询请假信息
     *
     * @param ofcmpayId 工资单ID
     * @return 请假信息
     */
    public SlOfcLeave selectSlOfcLeaveByOfcmpayId(Long ofcmpayId){
        return slOfcLeaveMapper.selectSlOfcLeaveByOfcmpayId(ofcmpayId);
    }

    /**
     * 查询请假信息列表
     * 
     * @param slOfcLeave 请假信息
     * @return 请假信息
     */
    @Override
    public List<SlOfcLeave> selectSlOfcLeaveList(SlOfcLeave slOfcLeave)
    {
        return slOfcLeaveMapper.selectSlOfcLeaveList(slOfcLeave);
    }

    /**
     * 新增请假信息
     * 
     * @param slOfcLeave 请假信息
     * @return 结果
     */
    @Override
    public int insertSlOfcLeave(SlOfcLeave slOfcLeave)
    {
        return slOfcLeaveMapper.insertSlOfcLeave(slOfcLeave);
    }

    /**
     * 修改请假信息
     * 
     * @param slOfcLeave 请假信息
     * @return 结果
     */
    @Override
    public int updateSlOfcLeave(SlOfcLeave slOfcLeave)
    {
        return slOfcLeaveMapper.updateSlOfcLeave(slOfcLeave);
    }

    /**
     * 批量删除请假信息
     * 
     * @param leaveMpayIds 需要删除的请假信息主键
     * @return 结果
     */
    @Override
    public int deleteSlOfcLeaveByLeaveMpayIds(Long[] leaveMpayIds)
    {
        return slOfcLeaveMapper.deleteSlOfcLeaveByLeaveMpayIds(leaveMpayIds);
    }

    /**
     * 删除请假信息信息
     * 
     * @param leaveMpayId 请假信息主键
     * @return 结果
     */
    @Override
    public int deleteSlOfcLeaveByLeaveMpayId(Long leaveMpayId)
    {
        return slOfcLeaveMapper.deleteSlOfcLeaveByLeaveMpayId(leaveMpayId);
    }

    /**
     * 删除请假信息
     *
     * @param ofcmpayId 工资主键
     * @return 结果
     */
    @Override
    public int deleteSlOfcLeaveByOfcmpayId(Long ofcmpayId){
        return slOfcLeaveMapper.deleteSlOfcLeaveByOfcmpayId(ofcmpayId);
    }
}
